<template>
   <header>
        <div class="left">
            <span v-if=" $route.name == 'login' " @click="get_back"><van-icon  name="arrow-left" size="18" /></span>
        </div>
        <div class="middle">猫眼电影</div>
        <div class="right" ><span  v-if=" $route.name !== 'login' " class="iconfont icon-liebiao"></span></div>
    </header>
</template>

<script>
export default {
    name:"AllTop",
    data(){
        return{
            cur_route_name:""
        }
    },
    methods:{
        get_back(){
            this.$router.go(-1);
        }
    }
}
</script>

<style lang="less" scoped>
    header{
        width:100%;
        height: 50px;
        background-color: rgb(229, 72, 71);
        display: flex;
        color: #fff;
        justify-content: space-around;
        align-items: center;
        .left{
            width: 15%;
        }
        .middle{
            width: 60%;
            font-size: 18px;
        }
        .right{
            width: 15%;
        }
    }
</style>>

